<template>
  <view class="cell-page">
    <view class="u-page__item">
      <u-cell-group>
        <u-cell value="设置" url="/pages/user/set_up/set_up"></u-cell>
      </u-cell-group>
    </view>

    <view class="userbox">
      <view v-if="isLoggedin === 1" class="login-button" @click="Login_index">未登录_点击登录</view>
      <view v-else>成功登录</view>
    </view>

    <view class="u-page__item">
      <u-cell-group>
        <u-cell title="钱包" isLink url="/pages/user/my_order/my_order"></u-cell>
        <u-cell title="我的银行卡" isLink url="/pages/user/my_bank_card/my_bank_card"></u-cell>
        <u-cell title="常见问题" isLink url="/pages/user/frequently_asked_question/frequently_asked_question"></u-cell>
        <u-cell title="完善个人信息" isLink url="/pages/user/online_service/online_service"></u-cell>
        <u-cell title="实名认证" isLink url="/pages/user/Certification_materials/Certification_materials"></u-cell>
      </u-cell-group>
    </view>
  </view>
</template>

<script>
import token from '@/common/token/token.js';

export default {
  data() {
    return {
      title: 'Hello',
      isLoggedin: 1
    };
  },
  onLoad() {
    let id = token.id;
    console.log('qqqqqqq' + uni.getStorageSync('userInfo_id') + 'wwwwwww');
    if (id != 0) {
      this.isLoggedin = false;
    }
  },
  created() {},
  methods: {
    Login_index() {
      uni.navigateTo({
        url: '/pages/index/index'
      });
    }
  }
};
</script>

<style>
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.userbox {
  margin-top: 20px;
  width: 100%;
  height: 130px;
  display: flex;
  background-color: #04ca75;
  color: white;
  justify-content: center;
  align-items: center;
}

.login-button {
  padding: 10px;
  font-size: 16px;
  background-color: #00b894;
  border-radius: 4px;
  cursor: pointer;
}

.u-page__item {
  margin-bottom: 20px;
}

.u-cell-text {
  font-size: 15px;
  line-height: 22px;
  color: #303133;
  margin-right: 5px;
}

.u-slot-value {
  line-height: 17px;
  text-align: center;
  font-size: 10px;
  padding: 0 5px;
  height: 17px;
  color: #ffffff;
  border-radius: 100px;
  background-color: #f56c6c;
}
</style>
